<template>
    <div>
        <table>
            <tbody>
                <tr>
                    <td>门店名称</td>
                    <td>
                        {{ date.name }}
                    </td>
                </tr>
                <tr>
                    <td>门店信息</td>
                    <td>
                       {{ date.xing }}
                    </td>
                </tr>
                <tr>
                    <td>营业时间</td>
                    <td>
                        {{ moment(date.dates).format("YYYY-MM-DD") }}
                    </td>
                </tr>
                <tr>
                    <td>门店详情</td>
                    <td>
                        {{ date.jieshao }}
                    </td>
                </tr>
            </tbody>
        </table>
        <a href="show">返回显示页面</a>
    </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';
import { useRoute } from 'vue-router';
import moment from 'moment';
const routhe = useRoute();

onMounted(()=>{
    xian()
})
const xian=()=>{
    var vid = routhe.query.id;
    axios.get("https://localhost:7264/api/Member/Xmember",{params:{id:vid}}).then(res=>{
        date.value=res.data;
    })
}

const date=ref({
  "id": 0,
  "name": "",
  "dates": "",
  "xing": "",
  "jieshao": ""
})
</script>

<style scoped>

</style>